const fs = require('fs');
const path = require('path');
const responseTemplate = {
    returnCode: 17000,
    returnDesc: '描述....',
    data: {},
};

const uuid = () => {
    return Math.random().toString().slice(2, 8) + '_ ' + Math.random().toString().slice(2, 8);
};

//onServer的特别配置
//10.100.252.5/
const getIsOnServer = () => {
    if (fs.existsSync(path.resolve(__dirname, '../../../../IAmTemplateLibsServers.txt'))) {
        return true;
    }
    return false;
};

module.exports = {
    responseTemplate,
    getIsOnServer,
    uuid,
};
